import { ObjCreate } from "../common/ObjCreate";
import { GroupMatchPlayerScheduleCellRenderer } from "./cellRenderer/GroupMatchPlayerScheduleCellRenderer";
import { SPublicMiniPlayer } from "../../../../Message/Public/SPublicMiniPlayer";
import { ArenaCrossPlayerScheduleData } from "./arenaCrossData/ArenaCrossPlayerScheduleData";
import { SArenaCrossBattlePlan } from "../../../../Message/Public/SArenaCrossBattlePlan";
import { DataProvider } from "../../../../fl/data/DataProvider";
import { GButton } from "../../../../com/mui/controls/GButton";
import { GTileList } from "../../../../com/mui/controls/GTileList";
//class ArenaCrossPlayerSchedule
    
    export  class ArenaCrossPlayerSchedule /* flash.display.Sprite */
    {
        constructor()
        {
            
            this._dataArray = [];
            this._dataArray1 = [];
            this._dataArray2 = [];
            this.init();
            return;
        }

        /* internal  */init(): void
        {
            ObjCreate.createBg(6, 2, 392, 396, this);
            this._tileList = ObjCreate.createTileList(11, 10, 380, 387, this);
            this._tileList.rowHeight = 43;
            this._tileList.columnWidth = 380;
            this._tileList.setStyle("cellRenderer", GroupMatchPlayerScheduleCellRenderer);
            this.addChild(this._tileList);
            return;
        }

        public updateData(arg1: SPublicMiniPlayer, arg2: Array<any>): void
        {
            var loc1=null;
            this._dataArray = [];
            var loc2=0;
            while (loc2 < arg2.length) 
            {
                loc1 = new ArenaCrossPlayerScheduleData(loc2 + 1, arg1, arg2[loc2] as SArenaCrossBattlePlan);
                this._dataArray.push(loc1);
                ++loc2;
            }
            this._tileList.dataProvider = new DataProvider(this._dataArray);
            this._tileList.drawNow();
            return;
        }

        /* internal */ /* var */_dataArray: Array<any>;

        /* internal */ /* var */_dataArray1: Array<any>;

        /* internal */ /* var */_dataArray2: Array<any>;

        /* internal */ /* var */_date1: Date;

        /* internal */ /* var */_date2: Date;

        /* internal */ /* var */_btn1: GButton;

        /* internal */ /* var */_btn2: GButton;

        /* internal */ /* var */_tileList: GTileList;
    }
